﻿<UserControl x:Class="ArticlesDemo.Page"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:nyt="clr-namespace:NYTimes;assembly=NYTimesSilverlightKit"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <UserControl.Resources>
        <nyt:Articles Query="Obama" x:Key="Articles"/>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot" DataContext="{StaticResource Articles}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <TextBox Text="{Binding Query, Mode=TwoWay}"/>
        <Button Grid.Column="1" Content="Search Articles"/>
        <ListBox Grid.Row="1" ItemsSource="{Binding Results}" DisplayMemberPath="Title" Grid.ColumnSpan="2"/>
    </Grid>
</UserControl>
